﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Data
{
    public class WarpPoint
    {
        #region Attributes
        private Guid wpId;
        private StarSystem starSystem;
        private bool explored;
        #endregion

        #region Properties
        public Guid WarpPointId
        {
            get { return wpId; }
        }
        public bool IsExplored
        {
            get { return explored; }
            set { explored = value; }
        }
        public Guid DestinationId
        {
            get
            {
                MasterWarpPoint mwp = starSystem.GetMWPDeails(wpId);
                if( mwp != null)
                    return starSystem.GetMWPDeails(wpId).DestinationId;

                return Guid.Empty;
            }
        }
        public MapIndex Location
        {
            get
            {
                MasterWarpPoint mwp = starSystem.GetMWPDeails(wpId);
                if (mwp != null)
                    return starSystem.GetMWPDeails(wpId).Location;

                return null;
            }
        }
        #endregion

        #region Constructors
        public WarpPoint(StarSystem star, Guid id)
        {
            wpId = id;
            starSystem = star;
        }
        #endregion
    }
}
